package com.lngsyz.eseal.base.enumeration;

import org.apache.commons.lang.StringUtils;

/**
 * 
 * @author: 印章材料(工商定价）
 * @date: 2019年4月18日
 * @version: 1.0
 */

public enum SealMaterialElec {

	TYPE_01("云章", "01"), 
	TYPE_02("ukey章", "02");

	private String name;
	private String key;

	private SealMaterialElec(String name, String key) {
		this.name = name;
		this.key = key;
	}

	public static String getNameByKey(String key) {
		if(StringUtils.isNotBlank(key)) {
			for (SealMaterialElec state : SealMaterialElec.values()) {
				if (state.getKey().equalsIgnoreCase(key)) {
					return state.getName();
				}
			}
		}
		return "";
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

}
